class ServerConfig {
  String serverName;
  String? flagUrl;
  String ovpnConfiguration;
  String? vpnUserName;
  String? vpnPassword;

  ServerConfig({
    required this.serverName,
    this.flagUrl,
    required this.ovpnConfiguration,
    this.vpnUserName,
    this.vpnPassword,
  });

  factory ServerConfig.fromJson(Map<String, dynamic> json) {
    return ServerConfig(
      serverName: json['serverName'],
      flagUrl: json?['flagUrl'],
      ovpnConfiguration: json['ovpnConfiguration'],
      vpnUserName: json?['vpnUserName'],
      vpnPassword: json?['vpnPassword'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'serverName': serverName,
      'flagUrl': flagUrl,
      'ovpnConfiguration': ovpnConfiguration,
      'vpnUserName': vpnUserName,
      'vpnPassword': vpnPassword,
    };
  }
}
